<?php
Doo::loadCore('db/DooModel');

class PhotoBase extends DooModel{

    /**
     * @var int Max length is 11.
     */
    public $photoid;

    /**
     * @var int Max length is 11.
     */
    public $albumid;

    /**
     * @var varchar Max length is 50.
     */
    public $name;

    /**
     * @var datetime
     */
    public $createtime;

    /**
     * @var varchar Max length is 50.
     */
    public $custom_keyword;

    /**
     * @var varchar Max length is 50.
     */
    public $custom_id;

    /**
     * @var varchar Max length is 50.
     */
    public $custom_number;

    /**
     * @var varchar Max length is 50.
     */
    public $custom_size;

    /**
     * @var varchar Max length is 50.
     */
    public $custom_name;

    /**
     * @var varchar Max length is 50.
     */
    public $custom_type;

    /**
     * @var varchar Max length is 50.
     */
    public $thumb_name;

    public $_table = 'photo';
    public $_primarykey = 'photoid';
    public $_fields = array('photoid','albumid','name','createtime','custom_keyword','custom_id','custom_number','custom_size','custom_name','custom_type','thumb_name');

    public function getVRules() {
        return array(
                'photoid' => array(
                        array( 'integer' ),
                        array( 'maxlength', 11 ),
                        array( 'optional' ),
                ),

                'albumid' => array(
                        array( 'integer' ),
                        array( 'maxlength', 11 ),
                        array( 'notnull' ),
                ),

                'name' => array(
                        array( 'maxlength', 50 ),
                        array( 'notnull' ),
                ),

                'createtime' => array(
                        array( 'datetime' ),
                        array( 'notnull' ),
                ),

                'custom_keyword' => array(
                        array( 'maxlength', 50 ),
                        array( 'notnull' ),
                ),

                'custom_id' => array(
                        array( 'maxlength', 50 ),
                        array( 'notnull' ),
                ),

                'custom_number' => array(
                        array( 'maxlength', 50 ),
                        array( 'notnull' ),
                ),

                'custom_size' => array(
                        array( 'maxlength', 50 ),
                        array( 'notnull' ),
                ),

                'custom_name' => array(
                        array( 'maxlength', 50 ),
                        array( 'notnull' ),
                ),

                'custom_type' => array(
                        array( 'maxlength', 50 ),
                        array( 'notnull' ),
                ),

                'thumb_name' => array(
                        array( 'maxlength', 50 ),
                        array( 'notnull' ),
                )
            );
    }

}